package View;

import java.util.ArrayList;

import BO.Order;
import BO.OrderItem;

public class OrderView {
	private int orderId;
	private int userId;
	private int status;
	private ArrayList<OrderItemView> items;
	
	public OrderView(Order order){
		orderId = order.getOrderId();
		userId = order.getUserId();
		status = order.getStatus();
		items = new ArrayList<OrderItemView>();
		ArrayList<OrderItem> list = order.getItems();
		for(int i = 0; i < list.size(); i++){
			items.add(new OrderItemView(list.get(i)));
		}
	}

	public int getOrderId() {
		return orderId;
	}

	public int getUserId() {
		return userId;
	}

	public int getStatus() {
		return status;
	}

	public ArrayList<OrderItemView> getItems() {
		return items;
	}
	
	

}
